/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kompoaufgabe4dom;

import Exceptions.StapelLeerException;
import Exceptions.StapelVollException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Dominik
 */
public class KompoAufgabe4Dom {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        GenerischerStapel<Integer> stapel = new GenerischerStapel<Integer>(5);
        try {
            stapel.push(1);
            stapel.push(2);
            stapel.push(3);
            stapel.push(4);
            stapel.push(5);
            System.out.println(stapel.pop());
            System.out.println(stapel.pop());
            System.out.println(stapel.pop());
            System.out.println(stapel.pop());
            System.out.println(stapel.pop());
            System.out.println("Ist Voll?: " + stapel.istVoll());
            System.out.println("Ist Leer?: " + stapel.istLeer());
        } catch (StapelLeerException ex) {
            Logger.getLogger(KompoAufgabe4Dom.class.getName()).log(Level.SEVERE, null, ex);
        } catch (NullPointerException ex) {
            Logger.getLogger(KompoAufgabe4Dom.class.getName()).log(Level.SEVERE, null, ex);
        } catch (StapelVollException ex) {
            Logger.getLogger(KompoAufgabe4Dom.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
}
